home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3834 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1021 b 

  1. Path: ix.netcom.com!netnews
  2. From: a1s@ix.netcom.com (Andrew Snyder)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: text file manipulation
  5. Date: Wed, 31 Jan 1996 17:04:44 GMT
  6. Organization: Netcom
  7. Message-ID: <4ent2e$81@ixnews3.ix.netcom.com>
  8. References: <4e6su7$6pu@paperboy.ids.net>
  9. NNTP-Posting-Host: ix-har6-16.ix.netcom.com
  10. X-NETCOM-Date: Wed Jan 31  6:07:10 AM PST 1996
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. scarney@conan.ids.net (scarney) wrote:
  14.  
  15.  
  16. >Another stupid question...
  17.  
  18. >I'm trying to write a little program to modify the /etc/passwd 
  19. >file...I'm curious how you take a line in a text file (like passwd) and 
  20. >change it. Does fwrite append, or if the file index is in the middle of 
  21. >the file will it overwrite whatever is there (i.e., do what I want to do 
  22. >with the file). If not, could you use the FILE pointer to change the data?
  23.  
  24. >Thanks.
  25.  
  26. >--Seth
  27.  
  28. get the Linux code for the passwd program and look to see how it was
  29. done there.
  30. Andrew Snyder
  31. a1s@ix.netcom.com
  32. char disclaimer[] = {'\0'}; /* I'm on cash net */
  33.  
  34.